#ifndef SOLUTIONPTRCOMPARATOR_H_
#define SOLUTIONPTRCOMPARATOR_H_
#include "../Solution/Solution.h"

/** Class used by the STL to compare solution pointers.  Implements
 * the "less than" operator.
 */
class SolutionPtrLTComparator 
{
    public:
        /** Compares the fitness of two solutions. 
         */
        bool operator()(Solution* const &s1, Solution* const &s2)
        {
            return s1->getFitness() < s2->getFitness();            
        }
};

/** Class used by the STL to compare solution pointers. Implements
 * the "greater than" operator.
 */
class SolutionPtrGTComparator 
{
    public:
        /** Compares the fitness of two solutions. 
         */
        bool operator()(Solution* const &s1, Solution* const &s2)
        {
            return s1->getFitness() > s2->getFitness();            
        }
};

#endif /*SOLUTIONPTRCOMPARATOR_H_*/
